<div class="row">
    <div class="col-md-3 offset-md-9">
        <%= if (current_user.Admin) { %>
            <a href="<%= postsCreatePath() %>" class="btn btn-primary">Add Post</a>
        <% } %>
    </div>
</div>
<div class="row">
    <div class="col-md-8">
        <%= for (p) in posts { %>
            <hr>
            <a href="<%= postsDetailPath({pid: p.ID}) %>"><h1><%= p.Title %></h1></a>
            <p><%= markdown(truncate(p.Content, {"size": 200})) %></p>
        <% } %>
    </div>
</div>
<div class="row">
    <div class="col">
        <%= paginator(pagination) %>
    </div>
</div>
